


#if !defined( __WXLEGENDWINDOW_H__ )
#define __WXLEGENDWINDOW_H__



#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
#pragma interface "legendwindow.h"
#endif

#include <wx/window.h>

#include "wx/legend.h"


const int LEGEND_WIDTH	= 70;
const int LEGEND_HEIGHT	= 60;



class WXDLLIMPEXP_CHART wxLegendWindow : public wxWindow

{
public:
	wxLegendWindow() {};
	wxLegendWindow(wxWindow *parent);




    void Add(const wxString &lbl, const ChartColor &col);
	void Clear();
	int GetCount() const;
	ChartColor GetColor(int n) const;
	wxString GetLabel(int n) const;



	void Draw(CHART_HPAINT hp, int x = 0, int y = 0);

private:
	wxLegend m_Legend;
	wxWindow *m_WinParent;



    void OnPaint(wxPaintEvent &event);
    void OnMouse(wxMouseEvent &event);
    void OnMouseMove(wxMouseEvent &event);


    DECLARE_DYNAMIC_CLASS(wxLegendWindow)

    DECLARE_EVENT_TABLE()
};

#endif // __WXLEGENDWINDOW_H__
